import request from '@/utils/request'

// 获取用户代币信息
export function getUserZbApi (params) {
  return request({
    url: '/virtual-coin/api/v2/user_coin',
    method: 'get',
    params
  })
}
/**
 * 代币价格信息获取
 * http://192.168.88.247:4999/web/#/196/1527
 * @param {*} data
 * @returns
 */
export function getZbSetting (data) {
  return request({
    url: '/virtual-coin/api/v1/get_setting',
    method: 'post',
    data
  })
}
/**
 * 根据商品分类获取商品信息（目前只支持获取智币商品）
 * http://192.168.88.247:4999/web/#/105/2011
 * @param {*} params
 * @returns
 */
export function getZbProduct (params) {
  return request({
    url: '/api/v1/product/by_type',
    method: 'get',
    params
  })
}

/**
 * 代币账单
 * http://192.168.88.247:4999/web/#/196/1533
 * @param {*} params
 * @returns
 */
export function orderListApi (params) {
  return request({
    url: '/virtual-coin/api/v2/bills',
    method: 'get',
    params
  })
}
/**
 * 获取智币赠送信息
 * http://192.168.88.247:4999/web/#/196/1650
 * @param {*} params
 * @returns
 */
export function getGiftOpt (params) {
  return request({
    url: '/virtual-coin/api/v1/get_gift_opt',
    method: 'get',
    params
  })
}

// 获取智币赠送信息
export function drawGiftOpt (params) {
  return request({
    url: '/virtual-coin/api/v1/draw_gift',
    method: 'get',
    params
  })
}
